package chapter2;

public class GBook {
	private String title
	
	GBook(String title) {
		this.title = title
	}
	
	String getTitle() {
		return title
	}
}

GBook gina = new GBook('Groovy in Action')

assert gina.getTitle() == 'Groovy in Action'
assert getTitleBackwards(gina) == 'noitcA ni yvoorG'

String getTitleBackwards(book) {
	title = book.getTitle()
	return title.reverse()
}